package com.jml.mycicre;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class T2 {

    @Autowired
    private T1 t1;

    public T2() {
        System.out.println("T2初始化");
    }

    public void t1ToT2(){
        System.out.println("T2类的t1ToT2被调用");
    }

    public void t2ToT1(){
        System.out.println("T2类的t2ToT1被调用");
        t1.t2Tot1();
    }
}
